public class T
{
}


import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String s = in.next();
            String[] ss=s.split(" ");
            for(int i=0;i<ss.length;i++){
                char a=ss[i].charAt(0);
                if('a'<=a&&a<='z'){
                    a-=32;
                }

                System.out.print(a);

            }



        }
    }
}


import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {


    public static int overNum(int[] nums,int left,int x){
        int total=0;
        while(total<x&&left<nums.length){

            total+=nums[left];
            left++;

        }

        if(total<x){
            return -1;
        }else{
            return left;
        }



    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int len = in.nextInt();
            int x = in.nextInt();
            int[] nums=new int[len];
            for(int i=0;i<len;i++){

                nums[i]=in.nextInt();
            }



            int left=0;
            int right=0;
            int distance=-1;
            for(int i=0;i<len;i++){
                int right1=overNum(nums,i,x);
                if(right1==-1){
                    break;
                }

                if(right1-i<distance||distance==-1){
                    distance=right1-i;
                    if(distance==0) break;
                    left=i+1;
                    right=right1;
                }

            }

            System.out.print(left+" ");
            System.out.print(right);
        }
    }
}